/**
 * @author zhouheng
 * @date 2022年03月15日 18:28
 */

package com.atguigu.common.constant;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int num = scanner.nextInt();

        getZhishu(num);
    }

    public static void getZhishu(int num) {
        int temp = (int) Math.sqrt(num);
        boolean flag = false;
        for (int i = 2; i < temp+1; i++) {
            int i1 = num % i;
            if (i1 == 0) {
                flag = true;
                System.out.print(i);
                System.out.print(" ");
                getZhishu(num / i);

                break;
            }
        }
        if (!flag) {
            System.out.print(num);
        }
    }

}
